<?
   
   $paging_url       = 'page'; //rewriteCate();  
   $current_page		= getValue('page','int','GET',1);
   $limit_page 		= 12;
   $total_pro        = countProduct();
	$limit 				= ($current_page - 1)*$limit_page . ',' . ($limit_page);
   $arr_product      = getProduct('',$limit,'pro_id');
?>
<div class="relative">
   <div class="pro-title relative">
      <em class="left-gym"></em>
      <em class="right-gym"></em>
      <span>Sản phẩm nổi bật</span>
      <div class="main-content relative">
         <ul class="black-transparent list-pro">
            <?
            $i = 0;
            foreach($arr_product as $key=>$value){
               $i++;
               $pro_price = ($value['pro_price'] > 0) ? format_number($value['pro_price']) : 'Liên hệ';
               $link = rewriteDetailProduct($value['pro_name'],$value['pro_id']);
            ?>
               <li class="items-pro">
                  <a href="<?=$link?>">
                     <?PrintImageThumbPro($value['pro_pic'],PATH_IMG_THUMB,'',$value['pro_name'])?>
                     <p><?=$value['pro_name']?></p>
                     <div class="op-product">
                        <span class="price-pro yellow"><?=$pro_price?></span>
                        <button class="relative">Chi tiết <em class="arrow-right"></em></button>
                     </div>
                  </a>
               </li>
               <?if($i%3 == 0){?>
                  <div class="line-ver clear-fix"></div>
               <?}?>
            <?}?>
         </ul>
         <ul class="list_pages clear-fix">
			   <?=generatePageBar('',$current_page,$limit_page,$total_pro,$paging_url,'btn-page','btn-page btn-select','Trước','Sau','Trang đầu','Trang cuối',1,1,3,'','page')?>
         </ul>
      </div>
   </div>
</div>


